/**
* @author:kellen
* @contact:xiekellen@hotmail.com
* @company:achivo-gz
* @created on:
* @modified on:
*/

package com.sasis.service.impl;

import java.util.List;

import com.sasis.service.impl.BaseManager;
import com.sasis.model.ConsumeProduct;
import com.sasis.dao.ConsumeProductDao;
import com.sasis.service.ConsumeProductManager;

import com.sasis.util.PageList;
import com.sasis.util.PageRequest;

public class ConsumeProductManagerImpl extends BaseManager implements ConsumeProductManager {
    private ConsumeProductDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setConsumeProductDao(ConsumeProductDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.sasis.service.ConsumeProductManager#getConsumeProducts(com.sasis.model.ConsumeProduct)
     */
    public List getConsumeProducts(final ConsumeProduct consumeProduct) {
        return dao.getConsumeProducts(consumeProduct);
    }

    /**
     * @see com.sasis.service.ConsumeProductManager#getConsumeProduct(String id)
     */
    public ConsumeProduct getConsumeProduct(final String id) {
        return dao.getConsumeProduct(new Integer(id));
    }

    /**
     * @see com.sasis.service.ConsumeProductManager#saveConsumeProduct(ConsumeProduct consumeProduct)
     */
    public void saveConsumeProduct(ConsumeProduct consumeProduct) {
        dao.saveConsumeProduct(consumeProduct);
    }

    /**
     * @see com.sasis.service.ConsumeProductManager#removeConsumeProduct(String id)
     */
    public void removeConsumeProduct(ConsumeProduct consumeProduct) {
        dao.removeConsumeProduct( consumeProduct);
    }
    public PageList queryForPageList(String listStatementId,  
    		Object parameterObject, PageRequest pageRequest){
	return dao.queryForPageList(listStatementId,   parameterObject, pageRequest);
    }
}
